/**
 * Created by cchen on 2015/4/16.
 */

var Schema = mongoose.Schema;


var shareAppNameSchema= new Schema({
    appName:{type: String, enum: ['wx']},
    appURL:String,
    imageURL:String
});
mongoose.model('mobile_app_shareAppName_restful', shareAppNameSchema,'mobile_app_shareAppName_restful');


var userSharesMongoSchema = new Schema({
    userId: {type: Schema.Types.ObjectId, ref: 'user'},
    feedsType:{type: String, enum: ['question', 'activity','app','specialTopic']},
    feedsId:String,
    dateCreated: {type: Date, default: Date.now},
    dateLastModified: {type: Date, default: Date.now},
    shareTo:String,
    numberOfClick:{type: Number, min: 0}
});
mongoose.model('mobile_app_user_share_restful', userSharesMongoSchema,'mobile_app_user_share_restful');


